Platform Explorer / Nuxeo Platform 11.3

Operation Context.GetUsersGroupIdsWithPermissionOnDoc (Get Users and Groups)

Description

Fetch the users and groups that have a given permission on the input document and then set them in the context under the given key variable name. The operation returns the input document. You can later use the list of identifiers set by this operation on the context from another operation. The 'key' argument represents the variable name and the 'permission' argument the permission to check. If the 'ignore groups' argument is false then groups will be part of the result. If the 'resolve groups' argument is true then groups are recursively resolved, adding user members of these groups in place of them. Be warned that this may be a very consuming operation. If the 'prefix identifiers' argument is true, then user identifiers are prefixed by 'user:' and groups identifiers are prefixed by 'group:'.
Operation id Context.GetUsersGroupIdsWithPermissionOnDoc
AliasesDocument.GetUsersAndGroups
Category Users & Groups
Label Get Users and Groups
Requires
Since

Parameters

Name Description Type Required Default value
permission string yes  
variable name string yes  
ignore groups boolean no false 
prefix identifiers boolean no false 
resolve groups boolean no false 

Signature

Inputs document
Outputs document

Implementation Information

Implementation Class Class: org.nuxeo.ecm.automation.core.operations.users.GetDocumentUsersAndGroups
Contributing Component org.nuxeo.ecm.core.automation.features.operations

JSON Definition

{
  "id" : "Context.GetUsersGroupIdsWithPermissionOnDoc",
  "aliases" : [ "Document.GetUsersAndGroups" ],
  "label" : "Get Users and Groups",
  "category" : "Users & Groups",
  "requires" : null,
  "description" : "Fetch the users and groups that have a given permission on the input document and then set them in the context under the given key variable name. The operation returns the input document. You can later use the list of identifiers set by this operation on the context from another operation. The 'key' argument represents the variable name and the 'permission' argument the permission to check. If the 'ignore groups' argument is false then groups will be part of the result. If the 'resolve groups' argument is true then groups are recursively resolved, adding user members of these groups in place of them. Be <b>warned</b> that this may be a very consuming operation. If the 'prefix identifiers' argument is true, then user identifiers are prefixed by 'user:' and groups identifiers are prefixed by 'group:'.",
  "url" : "Context.GetUsersGroupIdsWithPermissionOnDoc",
  "signature" : [ "document", "document" ],
  "params" : [ {
    "name" : "permission",
    "description" : null,
    "type" : "string",
    "required" : true,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  }, {
    "name" : "variable name",
    "description" : null,
    "type" : "string",
    "required" : true,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  }, {
    "name" : "ignore groups",
    "description" : null,
    "type" : "boolean",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ "false" ]
  }, {
    "name" : "prefix identifiers",
    "description" : null,
    "type" : "boolean",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ "false" ]
  }, {
    "name" : "resolve groups",
    "description" : null,
    "type" : "boolean",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ "false" ]
  } ]
}